﻿using MediatR;

namespace MediatRApp.Commands
{
    public class CreateUserCommand : IRequest
    {
        public string Name { get; set; }
    }

    public class CreateUserCommandHander : IRequestHandler<CreateUserCommand>
    {
        public CreateUserCommandHander()
        { 
        
        }
        public Task Handle(CreateUserCommand request, CancellationToken cancellationToken)
        {
            Console.WriteLine("创建成功");
            return Task.CompletedTask;
        }
    }
}